package mar.bt.impl.ui;

import javax.microedition.lcdui.Display;

import com.mar.meclient.bt.IBluetoothIOHandler;
import com.mar.meclient.bt.ui.impl.BTInquiryUI;
import com.mar.meclient.bt.ui.impl.BTPageNavigator;
import com.mar.meclient.util.ui.IPage;

/**
 * TODO: implement
 * @author mar
 *
 */
public class BTRemoteControlPageNavigator extends BTPageNavigator {

	public BTRemoteControlPageNavigator(Display disp) {
		super(disp);
	}
	
	public void navigateNext(IPage from, Object pageResult) {
		if ( from instanceof BTInquiryUI ){
			if ( pageResult instanceof IBluetoothIOHandler )
			{
				IPage mainBtPage = new RemoteBTMainPage(this);
				mainBtPage.createPageContent(pageResult);// pass result from inquiry page as input 
				setCurrentPage(mainBtPage);
			}
		}
	}

}
